package com.bawei.property.entity

import com.bawei.net.BaseResponse
import com.blankj.utilcode.util.GsonUtils
import org.json.JSONArray

/**
 * Author: Jason Zhang
 * Date: 2024/12/24
 * Desc: 申请车位列表返回
 */
data class ParkApplyResultEntity(
    val values: String
):BaseResponse() {
    fun getValues():List<ParkApplyValues>{
        var list = mutableListOf<ParkApplyValues>()
        var jsonArr = JSONArray(values)
        for (i in 0 until jsonArr.length()){
            list.add(GsonUtils.fromJson(jsonArr[i].toString(), ParkApplyValues::class.java))
        }
        return list
    }
}

data class ParkApplyValues(
    var type: Int,
    var state: Int,
    var applyTime: String,
    var title: String,
    var visitorId: Int,
    var parkId: Int,
    var repairId: Int,
    var color: Int,
)